﻿using System.Text.RegularExpressions;

namespace airwolf.HTTP
{
    public static class HTTPUtility
    {
        public static string GetPath(string Message)
        {
            return Regex.Match(Message, @"^GET (?<path>[^\s]+)").Groups["path"].Value;
        }

        public static string GetContentTypeString(ContentTypes ContentType)
        {
            switch (ContentType)
            {
                case ContentTypes.TextXML:

                    return "Text/XML; charset=\"utf-8\"";

                default:

                    return "";
            }
        }
    }
}
